package com.xuecheng.manage_cms.config;

import com.rabbitmq.client.AMQP;
import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName RabbitmqConfig
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/1/30 14:59
 * @since V1.0
 */
@Configuration
public class RabbitmqConfig {

    //交换机名称
    public static final String EX_ROUTING_CMS_POSTPAGE = "ex_routing_cms_postpage";

    /**
     * @Description 交换机配置使用direct类型
     * @author ShengJinFeng
     * @date 2020/1/30
     */
    @Bean(EX_ROUTING_CMS_POSTPAGE)
    public Exchange EXCHANGE_TOPICS_INFORM(){
        return ExchangeBuilder.directExchange(EX_ROUTING_CMS_POSTPAGE).durable(true).build();
    }
}
